package componentes;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.SwingConstants;




public class Botao extends JButton {

	private static final Dimension tamanhoBotao = new Dimension(90, 50);
	private static final Font fonte = new Font("Arial", Font.PLAIN, 9);
	
	public Botao(Icon icon, String nome, ActionListener listener) {
		super(nome, icon);
		addActionListener(listener);
		
		setVerticalTextPosition(SwingConstants.BOTTOM);
		setHorizontalTextPosition(SwingConstants.CENTER);
		setBorder(BorderFactory.createCompoundBorder(null, BorderFactory.createEmptyBorder(0, 0, 0, 0)));
		
		setFont(fonte);
		setPreferredSize(tamanhoBotao);
	}
}
